package com.example.demo.services;

import com.example.demo.domain.Student;
import com.example.demo.mapper.StudentMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentService {
    @Resource
    private StudentMapper studentMapper;

    public List<Student> list() {
        return studentMapper.list();
    }

    public List<Student> query(int id) {
        return studentMapper.query(id);
    }

    public List<Student> queryname(String name) {
        return studentMapper.queryname(name);
    }

    public Integer deleteto(Integer id) {
        return studentMapper.deleteto(id);
    }

    public Integer insertto(Student student) {
        return studentMapper.insertto(student);
    }

}
